package com.yhf.controller;


import com.yhf.constans.NodeId;
import com.yhf.model.Permission;
import com.yhf.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;

/**
 * @author lenovo
 */
@RestController
@RequestMapping("permission")
public class PermissionController {
    @Autowired
    private IPermissionService permissionService;
    @GetMapping("findAll")
    public List<Permission> findAll(){
        return permissionService.findAll(NodeId.ROOTNODE.getNode());
    }
}
